body {
    font-family: 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
}

header {
    background-color: #1a56a7;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px;
    margin-right: 15px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.banner {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-text {
    position: absolute;
    bottom: 50px;
    left: 50px;
    color: white;
    background-color: rgba(0,0,0,0.6);
    padding: 20px;
    max-width: 500px;
}

.news {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

article {
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 4px;
}

.date {
    color: #666;
    font-size: 0.9rem;
}


/* 问答按钮样式 */
.qa-button-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.qa-button {
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.qa-button:hover {
    background-color: #0052a3;
    transform: scale(1.1);
}

/* 新版问答弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.modal-header {
    padding: 16px 20px;
    background: #0066cc;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.close {
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.close:hover {
    transform: scale(1.2);
}

.chat-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f5f7fa;
}

.input-area {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

#qa-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
}

#qa-input:focus {
    border-color: #0066cc;
}

.send-btn {
    width: 50px;
    height: 50px;
    margin-left: 10px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.send-btn:hover {
    background: #0052a3;
}

.send-btn svg {
    color: white;
}

.modal-footer {
    padding: 10px;
    text-align: center;
    font-size: 12px;
    color: #666;
    background: #f5f7fa;
}

.user-question {
    text-align: right;
    background: #e3f2fd;
    padding: 8px 12px;
    border-radius: 18px;
    margin: 5px 0;
    display: inline-block;
    max-width: 80%;
    float: right;
    clear: both;
}

.ai-answer {
    text-align: left;
    background: #f1f1f1;
    padding: 8px 12px;
    border-radius: 18px;
    margin: 5px 0;
    display: inline-block;
    max-width: 80%;
    float: left;
    clear: both;
}

.ai-loading {
    color: #666;
    font-style: italic;
}

.ai-error {
    color: #d32f2f;
    font-weight: bold;
}

#qa-input {
    width: 70%;
    padding: 10px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* 关于我们页面样式 */
.about {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.about-image {
    width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 4px;
}

.stats {
    display: flex;
    justify-content: space-around;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    color: #1a56a7;
    font-weight: bold;
}

.stat-label {
    display: block;
    margin-top: 0.5rem;
}

nav a.active {
    background-color: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

/* 院系专业页面样式 */
.departments {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.department-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.department-card {
    border: 1px solid #ddd;
    padding: 1.5rem;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.department-card h3 {
    color: #1a56a7;
    margin-top: 0;
}

/* 招生就业页面样式 */
.admission {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.admission-content h3 {
    color: #1a56a7;
    border-bottom: 2px solid #1a56a7;
    padding-bottom: 0.5rem;
}

/* 智能问答样式 */
.qa-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.qa-container {
    margin-top: 1rem;
}

#qa-question {
    width: 70%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#qa-response {
    margin: 1rem 0;
    padding: 1rem;
    background: white;
    border: 1px solid #eee;
    border-radius: 4px;
    min-height: 100px;
}

/* 智能问答按钮和模态框样式 */
.qa-button-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.qa-button {
    background-color: #1a56a7;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

.close {
    color: #aaa;
    align-self: flex-end;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#qa-chat {
    flex: 1;
    overflow-y: auto;
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.user-question {
    text-align: right;
    background: #e3f2fd;
    padding: 8px 12px;
    border-radius: 12px;
    margin: 5px 0 5px 20%;
}

.ai-answer, .ai-loading, .ai-error {
    text-align: left;
    padding: 8px 12px;
    border-radius: 12px;
    margin: 5px 20% 5px 0;
    white-space: pre-wrap;
}

.ai-answer {
    background: #f5f5f5;
}

.ai-loading {
    background: #fff8e1;
    color: #ff8f00;
}

.ai-error {
    background: #ffebee;
    color: #c62828;
}

.clear-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.clear-btn:hover {
    background: #d32f2f;
}

#qa-input:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
}

#qa-input {
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}